<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    
</body>
<script>
    //算术运算符：
    //自增x++：x=x+1;  自减x--:x=x-1;
    let x = 1,y = 10,result;
    result = ++x+(++y)+y+x--+x+x;
    //2+11+11+2+1+1=28
    //x=1 y=11
    console.log(x);
    console.log(y);
    console.log(result);
    console.log('--------')
    //加号+两端中有字符时会自动将两个操作数拼接
    let num1 = 123,num2 = 'hello';
    let res = num1+num2;
    console.log(res);
    //赋值运算符
    //+=： a+=b > a=a+b
    let a=10,b=20;              //补码：反码+1
    console.log(a+=b);
    // 位移：
    let n1 = -9,n2 = 2;
    console.log(n1>>n2);
    let m1 = 9,m2 = 2;
    console.log(m1<<m2);
    //等于和全等于
    let varb1 = 123, varb2 = '123';
    console.log(varb1 == varb2);
    console.log(varb1 === varb2);










</script>
</html>